home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Shareware / openOffice.org 641 / Windows / f_0047 / sbasic.jar / text / sbasic / common / 03120101.xml < prev    next >
Extensible Markup Language  |  2001-09-07  |  2KB  |  37 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>Asc Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03120101"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         span.T1{
  7.                 font-weight:bold;}
  8.         </style></head><body>
  9.         
  10.         
  11.         <help:to-be-embedded Eid="asc" xmlns:help="http://openoffice.org/2000/help">
  12.             <p class="Head1">
  13.                 <help:link Id="66545">Asc Function [Runtime]</help:link>
  14.             </p>
  15.             <p class="Paragraph">Returns the ASCII value (American Standard Code for Information Interchange) of the first character in a string expression.</p>
  16.         </help:to-be-embedded>
  17.         <p class="Paragraph">
  18.             <span class="T1">Syntax</span>:</p>
  19.         <p class="Paragraph">Asc (Text As String) <help:key-word value="Asc" tag="kw66545_1" xmlns:help="http://openoffice.org/2000/help"/>
  20.         </p>
  21.         <p class="Paragraph">
  22.             <span class="T1">Return value</span>:</p>
  23.         <p class="Paragraph">Integer</p>
  24.         <p class="Paragraph">
  25.             <span class="T1">Parameter</span>:</p>
  26.         <p class="Paragraph">Text: Any valid string expression. Only the first character in the string is relevant.</p>
  27.         <p class="Paragraph">The Asc function is often used to replace keys with values; thus more or less representing the reverse of the <span class="T1">Chr$</span> function. If a string is blank in the Asc function, OpenOffice.org Basic reports a run-time error. In addition to printable ASCII characters (Codes 32-255), the ASCII function can also be used to detect non-printable key codes in ASCII code.</p>
  28.         <p class="Paragraph">
  29.             <span class="T1">Example:</span>
  30.         </p>
  31.         <p class="PropText">Sub ExampleASC</p>
  32.         <p class="PropText">Print ASC("A") REM returns 65</p>
  33.         <p class="PropText">Print ASC("Z") REM returns 90</p>
  34.         <p class="PropText">Print ASC("Las Vegas") REM returns 76, since only the first character is taken into account</p>
  35.         <p class="PropText">End Sub</p>
  36.         <p class="PropText"/>
  37.     </body></html>